Skip to content

Conversation

@elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Jan 23, 2026

The presence of a servicing directory (even empty) would enable file existence checks for all files in the deps.json. We always look in the servicing directory first (if it exists) - and only care about the file existence there, not in the regular app directory. This change limits file existence checks to only when probing the servicing directory itself.

This reduces I/O operations during startup for applications that have a servicing directory present (and don't use additional probe paths or shared stores).

For the staticconsoletemplate startup test in dotnet/performance, running locally on Windows, if an empty servicing directory exists:

Metric Before After Delta
Average 69.812 ms 58.895 ms -10.92 ms (-15.6%)
Min 69.392 ms 58.467 ms -10.93 ms
Max 70.772 ms 59.327 ms -11.45 ms
Std Dev 0.393 ms 0.290 ms -0.10 ms (26% tighter)
Range 1.38 ms 0.86 ms 38% smaller

@dotnet/appmodel @AaronRobinsonMSFT

Previously, the presence of a servicing directory would enable file
existence checks for all probed files (app, framework, lookup, and
servicing directories). This change limits file existence checks to
only when probing the servicing directory itself.

This reduces I/O operations during startup for applications that have
a servicing directory present but don't use additional probe paths or
shared stores.
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @agocke, @jeffschwMSFT, @elinor-fung
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reduces hostpolicy startup I/O when a servicing directory exists by limiting file existence checks to servicing probes instead of enabling them globally.

Changes:

  • Stop setting the global m_needs_file_existence_checks flag solely due to the presence of the servicing directory.
  • When probing a servicing config, explicitly enable is_servicing + file_existence search options for that probe only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants